#ifndef CRENDERBACKGROUND_H
#define CRENDERBACKGROUND_H

class CSpriteAnimation;
class CSprite;
struct SDL_Surface;

//**************************
//Manage rendering of a player
//**************************
class CRenderBackground
{
    private:
        int m_iYBackground; //position of the background that is displayed
        int m_iScrollSpeed; //speed of the scrolling

        CSprite * m_vEntitySprites;	    //Contains sprites needed by the entity
        SDL_Surface * m_Screen;         //Screen of the application
        CSpriteAnimation * m_BackgroundAnimation;   //we keep the animation for the background because
                                                    //it changes at all levels, so it's not stored statically in CSDL_Manager

    public:
        //**************************
        //Description : Constructor
        //Parameters : the speed of scrolling
        //Note : None
        //**************************
        CRenderBackground(int _iSpeed = 1);

        //**************************
        //Description : Constructor
        //Parameters : The screen,
        //              the animation of the background
        //              and the speed of scrolling
        //Note : None
        //**************************
        CRenderBackground(SDL_Surface * _screen, CSpriteAnimation * _BackgroundAnim, int _iSpeed = 1);

        //**************************
        //Description : Copy Constructor
        //Parameters : A CRenderBackground
        //Note : None
        //**************************
        CRenderBackground(CRenderBackground & _RenderBackground);

        //**************************
        //Description : Destructor
        //Parameters : None
        //Note : None
        //**************************
        ~CRenderBackground();

        //**************************
        //Description : Set the initial value for the rendering
        //Parameters : The screen,
        //              the animation of the background
        //              and the speed of scrolling
        //Return Value : None
        //Note : None
        //**************************
        void SetRender(SDL_Surface * _screen, CSpriteAnimation * _BackgroundAnim, int _iSpeed = 1);

        //**************************
        //Description : Initialise the rendering to its beginning
        //Parameters : None
        //Return Value : None
        //Note : None
        //**************************
        void InitRender();

        //**************************
        //Description : Set the screen
        //Parameters : The screen
        //Return Value : None
        //Note : None
        //**************************
        void SetScreen(SDL_Surface * _screen);

        //**************************
        //Description : Set the speed of scrolling
        //Parameters : The speed
        //Return Value : None
        //Note : None
        //**************************
        void SetScrollingSpeed(int _iSpeed);

        //**************************
        //Description : Return the speed of scrolling
        //Parameters : None
        //Return Value : The speed
        //Note : None
        //**************************
        int GetScrollingSpeed() const;

        //**************************
        //Description : Set sprites for the rendering if it's not done
        //Parameters : The animation of the background
        //Return Value : None
        //Note : None
        //**************************
        void SetSprites(CSpriteAnimation * _BackgroundAnimation);

        //**************************
        //Description : Render the entity and all things that have connections with it (shots of an entity, power up after death of an enemy, ...)
        //Parameters : None
        //Return Value : None
        //Note : None
        //**************************
        void Render();
};
#endif
